package com.spring.boot.service;

import com.spring.boot.po.User;
import com.spring.boot.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by liuaiguo on 2016/12/7.
 */
@Service
public class UserService {

    @Autowired
    private UserRepository userRepository;

    public User save(User user){
        return userRepository.save(user);
    }

    public User findById(Long id){
        return userRepository.findOne(id);
    }
}
